package com.paranoidmonkey.ode;


public class TriMesh extends Geom{

	public TriMesh(Space space,TriMeshData d){
		handle=AndrODE.dCreateTriMesh(space.handle,d.handle);
	}

	// public void dGeomTriMeshSetCallback(long g, dTriCallback[] Callback);
	// public dTriCallback[] dGeomTriMeshGetCallback(long g);
	// public void dGeomTriMeshSetArrayCallback(long GeomID, dTriArrayCallback[] ArrayCallback);
	// public dTriArrayCallback[] dGeomTriMeshGetArrayCallback(long GeomID);
	// public void dGeomTriMeshSetRayCallback(long GeomID, dTriRayCallback[] Callback);
	// public dTriRayCallback[] dGeomTriMeshGetRayCallback(long GeomID);
	// public void dGeomTriMeshSetTriMergeCallback(long GeomID, dTriTriMergeCallback[] Callback);
	// public dTriTriMergeCallback[] dGeomTriMeshGetTriMergeCallback(long GeomID);

	public void setTriMeshData(TriMeshData Data){
		AndrODE.dGeomTriMeshSetData(handle, Data.handle);
	}

	public TriMeshData getTriMeshData(){
		return new TriMeshData(AndrODE.dGeomTriMeshGetData(handle));
	}

	public void enableTC(int geomClass, int enable){
		AndrODE.dGeomTriMeshEnableTC(handle, geomClass, enable);
	}

	public boolean isTCEnabled(int geomClass){
		return (AndrODE.dGeomTriMeshIsTCEnabled(handle, geomClass)!=0);
	}

	public void clearTCCache(){
		AndrODE.dGeomTriMeshClearTCCache(handle);
	}

	public long getTriMeshDataID(){
		return AndrODE.dGeomTriMeshGetTriMeshDataID(handle);
	}

	public void getTriangle(int Index, float[] v0, float[] v1, float[] v2){
		AndrODE.dGeomTriMeshGetTriangle(handle, Index, v0, v1, v2);
	}

	public void getPoint(int Index, float u, float v, float[] Out){
		AndrODE.dGeomTriMeshGetPoint(handle, Index, u, v, Out);
	}

	public int getTriangleCount(){
		return AndrODE.dGeomTriMeshGetTriangleCount(handle);
	}

	public void dataUpdate(){
		AndrODE.dGeomTriMeshDataUpdate(handle);
	}

}
